CFLAGS += -g -m32 -Wall

all:	libqmp2

libqmp2:
	$(CC) -o alloc_hook.o -c $(CFLAGS) -fPIC alloc_hook.c
	$(CC) -shared -m32 -o libqmp2.so alloc_hook.o -lc

sample: sample.c alloc_hook.c
	$(CC) -c $(CFLAGS) -o sample.o sample.c
	$(CC) -c $(CFLAGS) -o alloc_hook.o alloc_hook.c
	$(CC) -o sample -m32 alloc_hook.o sample.o

clean:
	rm *.o *.so sample -rf

